<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
    <meta name="layout" content="bolao" />
    <g:set var="entityName" value="${message(code: 'role.label', default: 'Role')}" />
    <title><g:message code="default.list.label" args="[entityName]" /></title>
  </head>
  <body>
    <div class="body">
      <h1 class="title"><g:message code="default.list.label" args="[entityName]" /></h1>
      <g:if test="${flash.message}">
        <div class="message">${flash.message}</div>
      </g:if>
      <div class="list">
        <table class="table">
          <thead>
            <tr>
              <g:sortableColumn property="code" titleKey="role.code.label" />
              <g:sortableColumn property="description" titleKey="role.description.label" />
            </tr>
          </thead>
          <tbody>
          <g:each in="${roles}" status="i" var="role">
            <tr class="${(i % 2) == 0 ? 'odd' : 'even'}">
              <td><g:link action="show" id="${role.id}">${role.code?.encodeAsHTML()}</g:link></td>
              <td>${role.description?.encodeAsHTML()}</td>
            </tr>
          </g:each>
          </tbody>
        </table>
      </div>
      <div class="paginateButtons">
        <g:paginate total="${mz.matafe.bolao.Role.count()}" />
      </div>
    </div>
  </body>
</html>